const
    express = require('express'),
    webpack = require('webpack'),
    config = require('../config/webpack.config.dev.js'),
    webpackDevMiddleware = require('webpack-dev-middleware'),
    compiler = webpack(config),
    paths = require('../config/paths'),
    app = express()
;

app.use(webpackDevMiddleware(compiler, {
    historyApiFallback: true,
    stats: {
      colors: true
    },
    publicPath: '/'
}));

app.listen(3000, function (err) {
    if(err) {
        console.log(err);
    } else {
        console.log('启动了');
    }
});